package com.example.sea.back;

import com.example.sea.BackRoot;
import com.example.sea.core.CoreRoot;
import com.example.sea.core.data.MapperRoot;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 描述：
 *
 * @author zengyz
 * @date 2018/7/9 上午 11:54
 */
@SpringBootApplication
@ComponentScan(basePackageClasses = CoreRoot.class)
@ComponentScan(basePackageClasses = BackRoot.class)
@MapperScan(basePackageClasses=MapperRoot.class)
@EnableTransactionManagement
@EnableAspectJAutoProxy
@EnableScheduling
public class SeaBackApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(SeaBackApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SeaBackApplication.class);
    }
}
